define(() => {
    return function (id, goodsMsg, val) {
        let i = 0;
        goodsMsg.some((val, idx) => {
            i = idx;
            return val.id === id
        })
        goodsMsg[i].num = Number(val);
        localStorage.setItem("goodsMsg", JSON.stringify(goodsMsg))
    }
})